<template>
    <h1>watch-分页-page</h1>
    当前页：{{ page }}
    <hr>
    <button @click="page--">上一页</button>
    <button @click="page++">下一页</button>
</template>

<script setup>
import { ref, watch } from 'vue';

const page = ref(1);
watch(page,(nVal,oVla)=>{
    console.log(nVal,oVla);
    console.log("获取数据-axios");
})

</script>

<style lang="scss" scoped>

</style>